//
//  NetworkTools+User.swift
//  WeiBo2017
//
//  Created by 王璐 on 2017/4/26.
//  Copyright © 2017年 wl. All rights reserved.
//

import Foundation

//MARK: - 网络工具 - 用户接口
extension NetworkTools{
    
    /// 加载用户信息
    ///
    /// - parameter access_token: access_Token
    /// - parameter uid:          uid
    /// - parameter finished:     完成回调 ,返回用户信息
    func loadUser(access_token:String,uid:String,finished:@escaping ([String:AnyObject]?)->()){
        
        let urlString = "https://api.weibo.com/2/users/show.json"
        
        let parms = ["access_token":access_token,"uid":uid]
        
        request(method: .GET, urlString: urlString, parameters: parms as [String : AnyObject]?, finished: finished)
    }
    
}
